package org.pp.controller;

import org.pp.entity.Goods;
import org.pp.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author haima
 * @since 2024-03-02
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    IGoodsService goodsService;
    @GetMapping("/test")
    public void test(){
        Goods goods= new Goods();
        goods.setName("一双鞋子");
        goodsService.save(goods);
    }
}
